Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor versions detection in build-manifest #77145

Merged
merged 5 commits into from
Sep 29, 2020

Conversation

pietroalbini
Copy link
Member

This PR refactors how build-manifest handles versions, making the following changes:

  • build-manifest now detects the "package releases" on its own, without relying on rustbuild providing them through CLI arguments. This drastically simplifies calling the tool outside of x.py, and will allow to ship the prebuilt tool in a tarball in the future, with the goal of stopping to invoke x.py during promote-release.
  • The tar command is not used to extract the version and the git hash from tarballs anymore. The flate2 and tar crates are used instead. This makes detecting those pieces of data way faster, as the archive is decompressed just once and we stop parsing the archive once all the information is retrieved.
  • The code to extract the version and the git hash now stores all the collected data dynamically, without requiring to add new fields to the Builder struct every time.

I tested the changes locally and it should behave the same as before.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 24, 2020
@Mark-Simulacrum
Copy link
Member

Hm, so we can just merge this, but I'm thinking it would be good to @bors try and try to release a dev-static nightly with it just to test that it works on RCS as well. Unfortunately our CI here doesn't run build manifest in any capacity :/

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 24, 2020
@bors
Copy link
Contributor

bors commented Sep 24, 2020

⌛ Trying commit bb8430e with merge 07f65da...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2020
…versions, r=<try>

Refactor versions detection in build-manifest

This PR refactors how `build-manifest` handles versions, making the following changes:

* `build-manifest` now detects the "package releases" on its own, without relying on rustbuild providing them through CLI arguments. This drastically simplifies calling the tool outside of `x.py`, and will allow to ship the prebuilt tool in a tarball in the future, with the goal of stopping to invoke `x.py` during `promote-release`.
* The `tar` command is not used to extract the version and the git hash from tarballs anymore. The `flate2` and `tar` crates are used instead. This makes detecting those pieces of data way faster, as the archive is decompressed just once and we stop parsing the archive once all the information is retrieved.
* The code to extract the version and the git hash now stores all the collected data dynamically, without requiring to add new fields to the `Builder` struct every time.

I tested the changes locally and it should behave the same as before.

r? `@Mark-Simulacrum`
@bors
Copy link
Contributor

bors commented Sep 24, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 07f65da (07f65dac5fbf3ea413b985af6cf7fc9d50bd5246)

@pietroalbini
Copy link
Member Author

Kicked off promotion.

@pietroalbini
Copy link
Member Author

Promotion ended, it seems to work?

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 24, 2020

📌 Commit 73d9c24 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 24, 2020
@pietroalbini
Copy link
Member Author

@bors r-

Wait, there is actually a bug, this does not find the rust-src component.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 25, 2020
@pietroalbini
Copy link
Member Author

Addressed.

@pietroalbini
Copy link
Member Author

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Sep 29, 2020

📌 Commit 0749ad0 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 29, 2020
@bors
Copy link
Contributor

bors commented Sep 29, 2020

⌛ Testing commit 0749ad0 with merge 9b77a6a...

@bors
Copy link
Contributor

bors commented Sep 29, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Mark-Simulacrum
Pushing 9b77a6a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 29, 2020
@bors bors merged commit 9b77a6a into rust-lang:master Sep 29, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 29, 2020
@pietroalbini pietroalbini deleted the refactor-build-manifest-versions branch October 1, 2020 07:51
ehuss added a commit to ehuss/rust that referenced this pull request Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants